home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_09_04 / 9n04009a < prev    next >
Text File  |  1991-03-19  |  2KB  |  63 lines

  1. /* localeconv function */
  2. #include <limits.h>
  3. #include <locale.h>
  4.  
  5. /* static data for "C" and current locales */
  6. static char null[] = "";
  7. struct lconv _Clocale = {
  8.     NULL, "C",
  9.         /* LC_CTYPE */
  10.     NULL, NULL, NULL,
  11.         /* LC_MONETARY */
  12.     null,                    /* currency_symbol */
  13.     null,                    /* int_curr_symbol */
  14.     null,                    /* mon_decimal_point */
  15.     null,                    /* mon_grouping */
  16.     null,                    /* mon_thousands_sep */
  17.     null,                    /* negative_sign */
  18.     null,                    /* positive_sign */
  19.     CHAR_MAX,                /* frac_digits */
  20.     CHAR_MAX,                /* int_frac_digits */
  21.     CHAR_MAX,                /* n_cs_precedes */
  22.     CHAR_MAX,                /* n_sep_by_space */
  23.     CHAR_MAX,                /* n_sign_posn */
  24.     CHAR_MAX,                /* p_cs_precedes */
  25.     CHAR_MAX,                /* p_sep_by_space */
  26.     CHAR_MAX,                /* p_sign_posn */
  27.         /* LC_NUMERIC */
  28.     ".",                    /* decimal_point */
  29.     null,                    /* grouping */
  30.     null,                    /* thousands_sep */
  31. struct lconv _Locale = {
  32.     NULL, "C",
  33.         /* LC_CTYPE */
  34.     NULL, NULL, NULL,
  35.         /* LC_MONETARY */
  36.     null,                    /* currency_symbol */
  37.     null,                    /* int_curr_symbol */
  38.     null,                    /* mon_decimal_point */
  39.     null,                    /* mon_grouping */
  40.     null,                    /* mon_thousands_sep */
  41.     null,                    /* negative_sign */
  42.     null,                    /* positive_sign */
  43.     CHAR_MAX,                /* frac_digits */
  44.     CHAR_MAX,                /* int_frac_digits */
  45.     CHAR_MAX,                /* n_cs_precedes */
  46.     CHAR_MAX,                /* n_sep_by_space */
  47.     CHAR_MAX,                /* n_sign_posn */
  48.     CHAR_MAX,                /* p_cs_precedes */
  49.     CHAR_MAX,                /* p_sep_by_space */
  50.     CHAR_MAX,                /* p_sign_posn */
  51.         /* LC_NUMERIC */
  52.     ".",                    /* decimal_point */
  53.     null,                    /* grouping */
  54.     null,                    /* thousands_sep */
  55.  
  56. /* get pointer to current locale */
  57. #undef localeconv
  58. struct lconv *localeconv(void)
  59.     {
  60.     return (&_Locale);
  61.     }
  62.  
  63.